package com.niiwoo.civet.scheduler.trigger;/**
 * Created by DELL on 2017/12/19.
 */

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.account.service.AccountFundTransferDubboService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 资金划拨补单Job
 *
 * @author xiaoyingping
 * @create 2017-12-19 11:44
 **/
@Component
@Slf4j
public class AccountFundTransferJobTrigger {

    @Reference(version = "1.0.0")
    private AccountFundTransferDubboService accountFundTransferDubboService;

    /**
     * 资金划拨补单定时任务
     */
    @Scheduled(cron = "${account.fund-transfer}")
    public void queryGroupAccountTransferJob(){
        long startTime = System.currentTimeMillis();
        log.info("==========queryGroupAccountTransferJob start==========");
        accountFundTransferDubboService.queryGroupAccountTransferJob();
        log.info("==========queryGroupAccountTransferJob end, cost:{} ms==========", System.currentTimeMillis() - startTime);
    }

}
